package com.sky.result;

import cn.hutool.http.HttpStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResponse {

    /**
     * 状态码
     */
    private int code = HttpStatus.HTTP_OK;

    /**
     * 提示信息
     */
    private String msg;

    /**
     *是否成功
     * @return
     */
    public Boolean isSuccess() {
        if (HttpStatus.HTTP_OK == this.code) {
            return true;
        }
        return false;
    }

/*     public BaseResponse(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    protected BaseResponse() {
    } */

}
